<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>Document</title>
</head>

<body>
    <div id="info"></div>
    <script type="text/javascript" src="./lib/jquery.js"></script>
    <script type="text/javascript" src="./lib/template-web.js"></script>
    <script type="text/html" id="tempt-msg">
        <div>姓名：{{name}}</div>
        <div>班级：{{score}}</div>
        <div>年龄：{{age}}</div>
        <div>性别:{{@sex}}</div>
    </script>
    <script>
        var people = {
            name: "张珊",
            score: "计应1200",
            age: 18,
            sex: "<h1>女</h1>",
        };
        var str = template("tempt-msg", people);
        $("#info").html(str);
    </script>
</body>

</html>